package com.software.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.software.bean.ProductBean;
import org.apache.ibatis.annotations.MapKey;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wyj
 * @since 2024-03-24
 */
public interface ProductMapper extends BaseMapper<ProductBean> {

    List<ProductBean> selectReleaseList(Integer customerId);
    List<ProductBean> getReleaseProductList();
//    Integer updateListByIdBatch(List<Map<String  , Object>> list);

    IPage<ProductBean> getAllProductDisplayList(Page<ProductBean> page);

    IPage<ProductBean> getAllDisplayProduct(Page<ProductBean> page);

    ProductBean getProductDetailByProductId(Integer productId);

    List<ProductBean> getProductListByCategoryId(Integer categoryId);

    List<ProductBean> getProductForDeliveryList(Integer customerId);

    List<ProductBean> getSearchByContent(String content);

    @MapKey("name")
    List<Map<String, Object>> getSevenDaysReleaseCountGroupByCategory();
}
